
import os
import sys
from pathlib import Path
# sys.path.append(os.getcwd())
sys.path.append(str(Path(__file__).parent))


class Tool():

    def get_resource_path(self, relative_path):
        if hasattr(sys, '_MEIPASS'):
            return os.path.join(sys._MEIPASS, relative_path)
        return os.path.join(os.path.abspath("."), relative_path)


    def getProjectPath(args):
        userName = os.popen("whoami").read()[0:-1]
        projectPath = "/Users/{}/Library/TkProject/".format(userName)
        return projectPath